package mysql

import "gorm.io/gorm"

type Shop struct {
	gorm.Model
	Name   string  `gorm:"type:varchar(30);not null;comment:商品名称"`
	Price  float64 `gorm:"type:decimal(10,2);not null;comment:价格"`
	Number int     `gorm:"type:int(11);not null;comment:商品数量"`
	Status string  `gorm:"type:varchar(30);not null;comment:状态"`
}
type User struct {
	gorm.Model
	Account  string `gorm:"type:varchar(30);not null;comment:账号"`
	Password string `gorm:"type:char(32);not null;comment:密码"`
}
type Order struct {
	gorm.Model
	UserId   int     `gorm:"type:int(11);not null;comment:用户id"`
	Status   int     `gorm:"type:int(11);not null;comment:状态"`   //1已支付 2待支付 3未支付
	PayTypes int     `gorm:"type:int(11);not null;comment:支付方式"` //1支付宝 2微信 3银联
	Price    float64 `gorm:"type:decimal(10,2);not null;comment:价格"`
	Total    float64 `gorm:"type:decimal(10,2);not null;comment:总价格"`
	Number   int     `gorm:"type:int(11);not null;comment:数量"`
}
